#ifndef QTRACE_H
#define QTRACE_H

//#define LOG_ACTIVATED

#include "qlogger.h"

class QTrace
{
public:
	QTrace(QString text,quint8 lvl);
	~QTrace();


private:
	static quint8 m_imbrication;
	quint8 m_level;
	QString m_text;
};

#define __TRACE__						__TRACE_DEBUG( __FUNCTION__);
#define __TRACE_DEBUG( __TEXT__ )		QTrace trace(__TEXT__,LOG_DEBUG)
#define __TRACE_INFO( __TEXT__ )		QTrace trace(__TEXT__,LOG_INFO)
#define __TRACE_WARNING( __TEXT__ )		QTrace trace(__TEXT__,LOG_WARNING)
#define __TRACE_ERROR( __TEXT__ )		QTrace trace(__TEXT__,LOG_ERROR)

#endif // QTRACE_H
